package com.bw.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class MyAop {


    /**
     * 前置通知
     * @param joinPoint
     */
    @Before("execution(* com.bw.service.*.*(..))")
    public void before(JoinPoint joinPoint){
        System.out.println("方法名" + joinPoint.getSignature().getName());
        System.out.println("方法参数" + joinPoint.getArgs());

    }
}
